# Some utilities
#TODO: comment/document

macro(standard_paths ARG0 ARG1 ARG2)
    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ARG0}/${ARG1})
    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ARG0}/${ARG2})
    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${ARG0}/${ARG2})
    foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
        string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
        set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
        set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
        set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
    endforeach()
    set(CMAKE_DEBUG_POSTFIX d)
    set(CMAKE_MINSIZEREL_POSTFIX min)
endmacro()

macro(standard_config)
    set(CMAKE_AUTOMOC YES)
    set(CMAKE_INCLUDE_CURRENT_DIR YES)
endmacro()

